<?php
Yii::app()->clientScript->registerScriptFile($this->staticsPath."/frontend/js/jquery.js",CClientScript::POS_HEAD);
Yii::app()->clientScript->registerCssFile($this->staticsPath."/css/global.css");
Yii::app()->clientScript->registerCssFile($this->staticsPath."/css/index.css");
Yii::app()->clientScript->registerCssFile($this->staticsPath."/css/font-awesome.min.css");
Yii::app()->clientScript->registerCssFile($this->staticsPath."/Font-Awesome-3.2.1/css/font-awesome.min.css");

Yii::app()->clientScript->registerCss("CSS1","
    .cont_box img{
        height: 200px;
    }

   #loadings {
        left: 50%;
        position: absolute;
        top: 50%;
    }

");


?>
<style type="text/css">
    .main-box {
                height: 100%;
        left: 0;
        margin: 0 auto;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: -1;
    }
    .morcon {
        height: 100px;
        margin: 245px 20px 20px;
        position: relative;
        text-align: center;
    }

    .morcon .reg {
        background: rgba(255, 255, 255, 0) none repeat scroll 0 0;
        border: medium none;
        color: #fff;
        font-size: 20px;
        left: 4%;
        position: absolute;
        top: 0;
    }
    .morcon .login {
        background: rgba(255, 255, 255, 0) none repeat scroll 0 0;
        border: medium none;
        color: #fff;
        display: block;
        font-size: 20px;
        left: 51%;
        position: absolute;
        top: 39%;
    }

    .wrap .header{
        width: 100%;
        position: relative;
        height: 300px;
    }
    .wrap .footer {
        height: 300px;
        position: relative;
        width: 100%;
    }

    .wrap .header .mydodo{
        background: url("<?php echo $this->staticsPath."/img/mydodo.png" ?>") no-repeat scroll 0 0 / 150px auto;
        height: 40px;
        width: 150px;
        position: absolute;
        right: 15px;
        top: 25px;
    }
    .wrap .header .imgbg{
        background: url("<?php echo $this->staticsPath."/img/imgbg.png" ?>") no-repeat scroll 0 0 / 150px auto;
        height: 150px;
        width: 150px;
        position: absolute;
        left: 15px;
        top: 90px;
    }
    .imgbg .box{
        width: 100%;
        height: 100%;
        position: relative;
    }
    .imgbg .box img {
        border-radius: 50%;
        height: 80%;
        left: 15px;
        position: absolute;
        top: 15px;
        width: 80%;
    }
    .wrap .header .hname {
        height: 200px;
        left: 170px;
        position: absolute;
        top: 144px;
        width: 200px;
    }
    .wrap .header .hname p{
        color: #0066b3;
        font-size: 20px;
    }
    .wrap .header .list {


        height: 80px;
        left: 25px;
        position: absolute;
        top: 25px;
        width: 80px;
    }
    .wrap .header .list a{
        color: #0066b3;
        font-size: 30px;
    }

    .main-box {
        background: #29B6C4 url("<?php echo $this->staticsPath."/img/myshare.png" ?>") no-repeat scroll 0 0 / 100% auto;
        height: 100%;
        left: 0;
        margin: 0 auto;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: -1;
    }
    body{
        background-color: #29B6C4;
    }
    .header {
        position: fixed;
        top:0;
    }
    html,
    body,
    .data,
    .wrap {
        height: 100%;
    }
    .box {
        display: block;
        height: 80%;
        left: 15%;
        overflow-x: hidden;
        overflow-y: auto;
        position: relative;
        top: 5%;
        width: 81%;
    }
    .borders{
        background: url("<?php echo $this->staticsPath."/img/border.png" ?>") no-repeat scroll 0 0 / 100% 100%;
        width: 100%;
        position: relative;
        height: auto;
    }
    .borders .bg{
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        border: 0;
    }
    .borders .tx{
        width: 30px;
        height: auto;
    }
    .borders .content {
        color: #555;
        font-size: 12px;
        padding: 11% 10px 15% 18%;
        word-break: break-all;
    }
    .borders .ptx{
        margin-top: 5px;
    }
    .ht{
        background: url("<?php echo $this->staticsPath."/img/myshare1.png" ?>") no-repeat scroll 1px 1px / 110px auto;
        height: 104px;
        width: 153px;
        position: fixed;
        bottom:0;
        left: 10%;
    }
    .content a{
        color: #555;
    }
    .content a:visited{
        color: #555;
    }
    .link{
        border-top: 1px dashed #555555;
        margin-bottom: 5px;
        margin-top: 5px;
    }
    .nm {
        color: #0066b3;
    }
</style>

<div class="data" >
    <div class="main-box"></div>
<!--    <header class="homeHder header">-->
<!--        <a href="--><?php //echo $this->createUrl('index',array('openid'=>$openid)) ?><!--">-->
<!--        <div class="hder_return flol">-->
<!---->
<!--                <i class="size fa fa-angle-left"></i>-->
<!---->
<!--        </div>-->
<!--        </a>-->
<!--        <div class="hder_logo">我的心得</div>-->
<!--    </header>-->
    <section class="wrap">
        <div class="box">
            <?php if($list){ ?>
            <?php foreach($list as $v){ ?>
            <div class="borders">
<!--                <img class="bg" src="--><?php //echo $this->staticsPath."/img/border.png" ?><!--">-->
                <div class="content">
                    <p class="nm"><?php echo date('Y年m月d日 H:i',$v['create_time']) ?></p>
                    <span>
                        <?php echo CHtml::decode($v['content']) ?>
                    </span>
                    <a href="<?php echo Yii::app()->createUrl('index/show',array('id'=>$v['bid'],'openid'=>$openid)) ?>">
                    <p class="ptx">
                        <img class="tx" src="<?php echo Yii::app()->params['webPath'].$v['thumb'] ?>">
                        &nbsp;&nbsp;&nbsp;<?php echo $v['title'] ?>
                    </p>
                    </a>

                    <?php $comment_info =  BookComment::model()->getComment($v['id']); ?>

                <?php if($comment_info){ ?>
                    <p class="link"></p>
                    <?php foreach($comment_info as $vv){ ?>
                        <?php if($vv['role']==1){ ?>
                            <p class="name"><span class="nm"><?php echo $vv['user_name'] ?></span>：<?php echo $vv['content'] ?></p>
                        <?php }elseif($vv['role']==2){ ?>
                            <p class="name"><span class="nm"><?php echo $v['user_name'].'的'.$vv['is_relation'] ?></span>：<?php echo $vv['content'] ?></p>
                        <?php }elseif($vv['role']==3){ ?>
                            <p class="name"><span class="nm"><?php echo $vv['user_name'].'教师' ?></span>：<?php echo $vv['content'] ?></p>
                        <?php } ?>

                    <?php } ?>
                <?php } ?>

                </div>
            </div>
            <?php } ?>
            <?php } ?>


        </div>

    </section>
    <div class="ht"></div>
</div>
